#ifndef PYLON_H
#define PYLON_H

#include <QThread>
#include <QDebug>
#include <QDateTime>
#include <QElapsedTimer>
#include "pylon/PylonIncludes.h"
#include <pylon/BaslerUniversalInstantCamera.h>
#include "pylon/ImagePersistence.h"
#include "/usr/include/gdal/gdal_priv.h"
#include "gpio.h"
#include "lux.h"

// Namespace for using pylon objects.
using namespace Pylon;

using namespace Basler_UniversalCameraParams;

// Namespace for using cout.
using namespace std;



class pylon : public QThread
{
    Q_OBJECT
public:
    pylon();
    ~pylon();
    int stopflag = 0;
protected:
    void run();
private:
    const char* getName();
    Gpio *gpio;
    lux *V30D;

    int pix = 0;
    int row = 0;
    int exposure = 1500;
    uint16_t WaveBand[300][7680];
    static const int c_countOfImagesToGrab = 20;        //picture number

    QElapsedTimer timer;        //ElapsedTimer to calculate FPS
signals:
    void startSignal();
private slots:
    void shotSlot();
};

#endif // PYLON_H
